import request from '../request/request'

export function login(data) {
    return request({
        url: '/user/loginCheck',
        method: 'post',
        data: data
    })
}

export function shopList(data) {
    return request({
        url: '/business/listall',
        method: 'get',
        params:data
    })
}

export function shopAdd(data) {
    return request({
        url: '/business/addShop',
        method: 'post',
        data:data
    })
}

export function shopItems(data) {
    return request({
        url: '/shop/shopItems',
        method: 'get',
        params:data
    })
}

export function newItem(data) {
    return request({
        url: '/shop/newItem',
        method: 'get',
        params:data
    })
}

export function itemXj(data) {
    return request({
        url: '/shop/itemXj',
        method: 'get',
        params:data
    })
}

export function allItem(data) {
    return request({
        url: '/shop/allItem',
        method: 'get',
        params:data
    })
}

export function addItem(data) {
    return request({
        url: '/shop/addItem',
        method: 'post',
        data:data
    })
}

export function allOrder(data) {
    return request({
        url: '/shop/allOrder',
        method: 'get',
        params:data
    })
}

export function confirmOrder(data) {
    return request({
        url: '/shop/queren',
        method: 'get',
        params:data
    })
}

export function cancelOrder(data) {
    return request({
        url: '/shop/refunds',
        method: 'get',
        params:data
    })
}


// =========================================================
export function allShop(data) {
    return request({
        url: '/customer/allShop',
        method: 'get',
        params:data
    })
}

export function userShopItems(data) {
    return request({
        url: '/customer/shopItems',
        method: 'get',
        params:data
    })
}

export function updateLineItem(data) {
    return request({
        url: '/customer/updateLineItem',
        method: 'post',
        data:data
    })
}

export function orderDetail(data) {
    return request({
        url: '/customer/orderDetail',
        method: 'get',
        params:data
    })
}

export function userCancelOrder(data) {
    return request({
        url: '/customer/cancel',
        method: 'get',
        params:data
    })
}

export function userPayOrder(data) {
    return request({
        url: '/customer/pay',
        method: 'get',
        params:data
    })
}

export function orderList(data) {
    return request({
        url: '/customer/allOrder',
        method: 'get',
        params:data
    })
}
